<style>
    #user-action{
        margin-top: 20px;
    }
</style>
<div id="user-action">
</div>
<script  data-th-inline="javascript">
    layui.use(['element', 'jquery', 'util'], function () {
        var $ = layui.jquery,
            element = layui.element,
            util = layui.util,
            userLog = [[${userOperationLogList}]],
            $view = $('#user-action'),
            html;

            function init() {
                html = '<ul class="layui-timeline">';
                layui.each(userLog,function (i,t) {
                    html += ' <li class="layui-timeline-item">\
                                <i class="layui-icon layui-timeline-axis">&#xe63f;</i>\
                                <div class="layui-timeline-content layui-text">\
                                      <h3 class="layui-timeline-title">'+util.timeAgo(t.createTime,"yyyy年MM月dd日 HH时mm分ss秒") +'</h3>\
                                      <p>\
                                       操作：'+t.operation+'\
                                       <br>\
                                       地点：'+t.location+'\
                                       <br>\
                                       结果：'+(t.result ? "成功":"失败")+'\
                                      </p>\
                                </div>\
                             </li>'
                })
                html += "</ul>";
                $view.html(html);
            }
            init();

    });
</script>